<?php
$SITE_MIDDLE .= FormatElement ( GetLangString ( $lang, "txt_pleaselogin") , 
			"<center><table border=\"0\"  width=\"75%\"><tr><td align=\"center\" valign=\"top\" width=\"50%\">". 
			FormatLink(GetLangString($lang,"txt_signup"),GetLangString($lang,"msg_signup"),"index.php?do=signup").
			FormatLink(GetLangString($lang,"txt_aboutsite"),GetLangString($lang,"msg_aboutsite"),"index.php?do=about").
			"</td><td align=\"center\" valign=\"top\">".			
			FormatLink(GetLangString($lang,"txt_bscp"),GetLangString($lang,"msg_bscp"),"index.php?do=bscp") .
			FormatLink(GetLangString($lang,"txt_chat"),GetLangString($lang,"msg_chat"),"javascript:ShowChatWindow()").
			"</td></tr></table></center>");

//-- adding news etc.
	$query = "Select * from `news` where `lang`='$lang' order by `time` desc limit 3";
	//$query = "Select top 3 * from `news` where `lang`='$lang' order by `time` asc";
	$result 		=	 mysql_query($query);
	if (mysql_num_rows($result)) {
		while ($news = mysql_fetch_assoc($result)){
			$time = str_ireplace("%datetime%",date("d-m-Y H:i:s",$news['time']),GetLangString($lang,"txt_newsadded"));
			$sitenews .= FormatSmallElement( $time , $news['text'] ) ;
		}
	} else {
		$sitenews = 	GetLangString($lang,"txt_nonews");
	}
	$SITE_MIDDLE .= FormatElement( GetLangString ($lang, "txt_news") , bb2html($sitenews) ) ;

// 
/*
		<a href=\"index.php?do=signup\">".GetLangString($lang,"txt_signup")."</a><br>
<!--		<a href=\"index.php?do=import\">Import old account</a><br>
		<a href=\"index.php?do=recover\">Lost password</a> -->");
*/
//$SITE_MIDDLE .= FormatElement ( GetLangString ( $lang, "txt_guest") , GetLangString ( $lang, "msg_guest") ) ;


?>
